﻿using System.Web.Script.Services;
using System.Web.Services;
using System.Web.Security;
using System;

namespace TeamFranceTriple
{
    /// <summary>
    /// Summary description for images
    /// </summary>
    [WebService(Namespace = "http://www.teamfrancetriple.com/Images")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    [System.Web.Script.Services.ScriptService]
    public class images : System.Web.Services.WebService
    {
        private static string[] _Colonels = new string[] { 
                "CaptainMagicAA",
                "Sc0obY-74-FR",
                "aerius28",
                "laurent950",
                "indiana51",
                "tytyzebest", 
                "Arthur57-v1", 
                "sergio6483", 
                "StephTheNoob", 
                "alibabar220879", 
                "DriiDrii74", 
                "Futaldammage",
                "eternity57",
                "theboulette",
                "Minidemon35",
                "langediabolik",
                "moumou-psn",
                "v0dK7",
                "CruggYY"};

        [System.Web.Services.WebMethod]
        [System.Web.Script.Services.ScriptMethod]
        public AjaxControlToolkit.Slide[] GetSlides()
        {

            AjaxControlToolkit.Slide[] _ColonelSlides = new AjaxControlToolkit.Slide[_Colonels.Length];
            int i = 0;
            foreach (var _colonel in _Colonels)
            {
                _ColonelSlides[i++] = new AjaxControlToolkit.Slide(string.Format("http://g.bf3stats.com/pc/FDxZ6TTp/{0}.png", _colonel),
                    string.Format("<a href=\"http://bf3stats.com/stats_pc/{0}\" target=\"_blank\">{0}</a>", _colonel),
                String.Empty);
            }
            return _ColonelSlides;
        }

        /// <summary>
        /// La surcharge de GetSlides accepte un paramètre ContextKey
        /// </summary>
        /// <param name="ContextKey"></param>
        /// <returns></returns>
        public AjaxControlToolkit.Slide[] GetSlides(string ContextKey)
        {
            return new AjaxControlToolkit.Slide[1];
        }
    }
}

